home *** CD-ROM | disk | FTP | other *** search
Text File | 1989-10-12 | 2.6 KB | 61 lines | [TEXT/GEOL] |
- Item 8981286 12-Oct-89 08:06
-
- From: D2086 Efficient Field Svc, C Faith,PRT
-
- To: MUYSVASOVIC1 ER&D - J-D Muys-Vasovic
- MACAPP.TECH$ MACAPP Tech
-
- Sub: Changing MacApp source again!
-
- Jean-Denis,
-
- Actually I think the problem of changing source code is very much related to
- MacApp (or any similar published class library), although it can be solved by
- certain potential constructs in the language it is not primarily a language
- issue.
-
- MacApp is a uniform set of objects that we are hesitant to change because they
- are not ours. We neither own them nor control what changes in them on an
- official basis. This means that as the official version of MacApp changes we
- change our versions to more closely match that version.
-
- Without MacApp's presence, if we were dealing entirely with our own source, we
- would simply change the source and that would become the next version, there
- would be no downside to making changes (unless we had shipped applications
- based on previous versions of our own code).
-
- I think there should be an official way to make changes in MacApp (or at least
- what gets linked into our program).
-
- I suggest 2 things (yes I have suggested them before):
-
- We use a new Keyword REPLACE to specify methods that are not OVERRIDE's but
- that actually replace the definitions in a class, for example one could specify
- a method that would REPLACE TView.IRes. This replacement would affect all
- descendants of TView in the normal fashion. The word REPLACE would tell the
- linker, "this is the definition to use" (not the one in MacApp) and would avoid
- the ambiguities of multiply defined symbols. REPLACE would be useful when one
- wanted to change one or two implementations of certain methods.
-
- We should also have an ALIAS keyword, this would allow us to add functionality
- to the class hierarchy. As an example, suppose we wanted to be able to have
- all TEvtHandlers respond to certain System 7 IAC events. We could define a new
- OBJECT TIACEvtHandler = OBJECT(TEvtHandler)
-
- FUNCTION TIACEvtHandler.DoIACMessage(theMessage: Message): TCommand;
-
- END;
- and then define:
- ALIAS TEvtHandler = TIACEvtHandler
-
- This would have the effect of making all descendants of TEvtHandler really
- descendants of TIACEvtHandler, in effect adding functionality to TEvtHandler at
- link time.
-
- Perhaps I am not looking at things properly but I would find this sort of
- capability extremely useful. It would enable a lot of really interesting sort
- of changes that would otherwise be really ugly to implement.
-
- - Curtis
-
-